Repository navigation
fix(pkgs/id): port the #598 exit-code fix to the pkgs/id update-nixpkgs-inputs copies + anti-drift guard (#2783) - #3021
Merged
Conversation
…gs-inputs copies + anti-drift guard (#2783) The pkgs/id copies never received #598: failed updates exited 0 and the wrapper re-ran the whole update after a genuine failure. Porting the root scripts/ copies verbatim makes both pairs byte-identical. Anti-drift guard: scripts/tests/test_update_nixpkgs_inputs.py asserts byte-identity of both pairs and pins the #598 contract for BOTH copies (failing update exits 1, up-to-date exits 0, wrapper runs the body exactly once on genuine failure and falls back to python3 only on 126/127). These tests also supply the stub-nix harness #603 asks for, for both copies. Negative controls: pre-fix pkgs/id .py exits 0 under a failing stub nix; the pre-fix wrapper paired with a genuinely-failing .py executes the update twice. Verified on the laptop: python3 -m unittest discover -s scripts/tests -p test_update_nixpkgs_inputs.py — 6 tests OK. Root copies untouched; pkgs/id just recipes unchanged.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 50 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2783. Queue task 4030 (repo-health-code-pilot).
What
The pkgs/id copies of
update-nixpkgs-inputs.{py,sh}— the ones the pkgs/id just recipes actually run — never received the #598 silent-failure fix that landed in the rootscripts/copies:pkgs/id/scripts/update-nixpkgs-inputs.py: failed updates exited 0 (no failure tally after the summaries).pkgs/id/scripts/update-nixpkgs-inputs.sh: the pre-update-nixpkgs-inputs: failed updates still exit 0 — and the .sh wrapper would re-run the whole update once that is fixed #598 one-liner fell back to python3 on any non-zero exit, re-running the whole update after a genuine failure.This PR ports the root copies verbatim — the .py diff was exactly the missing tally block and nothing else — so both pairs are now byte-identical. No behaviour change for the root copies; the pkgs/id just recipes and input discovery are untouched.
Anti-drift guard (acceptance 3)
New
scripts/tests/test_update_nixpkgs_inputs.py(unittest, stubnix+ stubuv):Failed: 1; up-to-date exits 0;This also supplies the stub-nix harness #603 asks for, extended to both copies; #603 remains open for wiring script tests into CI.
Verification (laptop)
python3 -m unittest discover -s scripts/tests -p 'test_update_nixpkgs_inputs.py'— 6 tests, OK.cmpconfirms both pairs byte-identical after the port.Need help on this PR? Tag
@codesmith-botwith what you need.